install (){
    if [ -d "$1" ]; then
        sudo rm -r "$1"
    fi
    git clone "https://gitee.com/lishaojing/$1.git"
    cd "$1"
    sudo ./install.sh
    cd ..
    sudo rm -r "$1"
}
ussage (){
    echo "Ussage:"
    echo "    -h  ussage"
    echo "    --OpenMesh  install OpenMesh_8.1"
    echo "    --CLI11  install CLI11"
    echo "    --eigen  install eigen3"
    echo "    --lp_solve  install lp_solve5.5"
    echo "    --sdl  install SDL2"
    echo "    -a  install all libraries above"
}
if [ "$1" == "-h" ]; then
    ussage
fi
if [ "$#" == "0" ]; then
    ussage
fi
if [ "$1" == "--OpenMesh" ];then
    install "OpenMesh" 
fi
if [ "$1" == "--CLI11" ];then
    install "CLI11" 
fi
if [ "$1" == "--eigen" ];then
    install "eigen"
fi
if [ "$1" == "--lp_solve" ];then
    install "lp_solve"
fi
if [ "$1" == "--sdl" ];then
    install "sdl"
fi
if [ "$1" == "-a" ];then
    install "OpenMesh"
    install "CLI11"
    install "eigen"
    install "lp_solve"
    install "sdl"
fi
